import Vue from 'vue'
import App from './App.vue'
import router from './router'
import '@/assets/css/global.less'
import request from './utils/request'
import './assets/aly_icons/iconfont.css'
// 导入富文本编辑器
import VueQuillEditor from 'vue-quill-editor'

Vue.prototype.$axios = request

Vue.config.productionTip = false
Vue.use(VueQuillEditor)
Vue.filter('dateFormat', (originValue) => {
  const dt = new Date(originValue * 1000)
  const y = dt.getFullYear()
  const m = (dt.getMonth() + 1 + '').padStart(2, '0')
  const d = (dt.getDate() + '').padStart(2, '0')
  const hh = (dt.getHours() + '').padStart(2, '0')
  const mm = (dt.getMinutes() + '').padStart(2, '0')
  const ss = (dt.getSeconds() + '').padStart(2, '0')
  return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
